package com.example.forum.model;


import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import java.util.Date;

@Data
public class Article {
    private Long id;

    private Long boardId;

    private Long userId;

    @NotBlank(message = "标题不能为空")
    private String title;

    private Integer visitCount;

    private Integer replyCount;

    private Integer likeCount;

    private Byte state;

    private Byte deleteState;

    private Date createTime;

    private Date updateTime;

    @NotBlank(message = "内容不能为空")
    private String content;

    private Boolean Own;

    /**
     * 文章状态：0-草稿，1-已发布
     */
    private Integer status;

    //关联作者
    private User user;

    //关联板块
    private Board board;
}